package com.ctsi.manager;

import com.ctsi.entity.SysMenuUserOrg;
import com.ctsi.entity.req.AddSysUserMenuOrgReq;
import com.ctsi.mapper.SysMenuUserOrgMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Slf4j
@Component
public class SysMenuUserOrgManager {

    @Resource
    private SysMenuUserOrgMapper sysMenuUserOrgMapper;

    public Integer insertSysMenuUserOrg(AddSysUserMenuOrgReq req) {
        SysMenuUserOrg sysMenuUserOrg = new SysMenuUserOrg();
        BeanUtils.copyProperties(req, sysMenuUserOrg);
        log.info("SysMenuUserOrgManager.insertSysMenuUserOrg sysMenuUserOrg = {}", sysMenuUserOrg);
        return sysMenuUserOrgMapper.insertSysMenuUserOrg(sysMenuUserOrg);
    }

}
